//
//  BetBaseCollectionVC.h
//

#import <UIKit/UIKit.h>
#import "LRBaseVC.h"

#define KIND_HEADER UICollectionElementKindSectionHeader
#define KIND_FOOTER UICollectionElementKindSectionFooter

@protocol BaseVCDelegate <NSObject>

@required
-(NSInteger)numberOfSections:(NSInteger)section;
-(UICollectionViewCell *)cell:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath;
-(CGSize)itemSize:(NSIndexPath *)indexPath;

@optional
-(NSInteger)numberSections;
-(CGFloat)columnSpacing:(NSInteger)section;
-(CGFloat)lineSpacing:(NSInteger)section;
-(UIEdgeInsets)sectionMargin:(NSInteger)section;
-(CGSize)footerHeight:(NSInteger)section;
-(CGSize)headerHeight:(NSInteger)section;
-(UICollectionReusableView*)headerView:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath;
-(UICollectionReusableView*)footerView:(UICollectionView *)collectionView indexPath:(NSIndexPath *)indexPath;
-(void)onItemClick:(NSIndexPath *)indexPath;

@end

@interface BaseCollectionVC : LRBaseVC

@property(nonatomic,strong) UICollectionView *collectionView;

-(void)registerCell:(NSString*)identifier;
-(void)registerHeader:(NSString*)identifier;
-(void)registerFooter:(NSString*)identifier;

@property(nonatomic,weak) id<BaseVCDelegate> delegate;
@end

